<extend name="$_home_public_layout"/>

<block name="style">
    <style type="text/css">
    </style>
</block>

<block name="jumbotron">
    <div id="cms-carousel" class="carousel slide" data-ride="carousel" >
        <!-- 轮播（Carousel）项目 -->
        <div class="carousel-inner">
            <cms:slider_list name="slider">
                <div class="item <php> if($i==1) echo 'active';</php>">
                    <a href="{$slider.url}"><img src="{$slider.cover_url}" style="width: 100%;height: 300px;"></a>
                </div>
            </cms:slider_list>

        <!-- 幻灯片导航 -->
        <ol class="carousel-indicators">
            <cms:slider_list name="slider">
                <li class="<php> if($i==1) echo 'active';</php>" data-target="#cms-carousel" data-slide-to="<?php echo $i-1; ?>"></li>
            </cms:slider_list>
        </ol>

        <!-- 左右切换按钮 -->
        <a class="left carousel-control hidden-xs" href="#cms-carousel" data-slide="prev"><span class="fa fa-chevron-left"></span></a>
        <a class="right carousel-control hidden-xs" href="#cms-carousel" data-slide="next"><span class="fa fa-chevron-right"></span></a>
    </div>
</block>

<block name="main">
    <div class="container">
        <!-- 资讯 -->
        <div class="row">
            <!-- 循环输出顶级分类列表及文章列表，注意用ignore_system过滤链接和单页特殊分类 -->
            <cms:category_list name="cate" ignore_system="true">
                <?php if(!$cate['is_system']): ?>
                    <div class="col-xs-12 col-sm-6">
                        <div class="panel panel-default">
                            <div class="panel-heading">
                                {$cate.title}
                            </div>
                            <div class="panel-body">
                                <ul class="list-unstyled">
                                    <cms:article_list name="vo" cid="$cate['id']" limit="8">
                                        <li>
                                            <a target="_blank" class="text-muted" href="{$vo.href}">
                                                <i class="fa {$vo.icon}"></i>
                                                <span>{$vo.title|cut_str=0,20}</span>
                                                <span class="pull-right visible-lg">{$vo.create_time|time_format}</span>
                                            </a>
                                        </li>
                                    </cms:article_list>
                                </ul>
                            </div>
                        </div>
                    </div>
                <?php endif; ?>
            </cms:category_list>
        </div>
    </div>
</block>
